<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\index\model;

use think\Model;

class ShopGoodsModel extends Model
{
    // 确定链接表名
    protected $table = 'xl_shop_goods';

    /**
     * 获取直播的商品
     * @param $where
     */
    public function getGoodsByWhere($where)
    {
        return $this->field('id,goods_name,goods_brief,cover_img')->where($where)->select();
    }

   
   
    /**
     * 根据管理员id获取角色信息
     * @param $openid
     */
    public function getOneWxUser($openid)
    {
        return $this->where('openid',$openid)->find();
    }
 
}